package org.mx.service.server.jmx;

import org.mx.service.server.WebServerConfigBean;

/**
 * Web服务器MXBean实现类
 * @author john.peng
 *
 */
public class WebServer extends HttpServer implements WebServerMXBean {
	/**
	 * 构造函数
	 * @param configBean Web服务器配置信息对象
	 */
	public WebServer(WebServerConfigBean configBean) {
		super(configBean);
	}

	@Override
	public String getContextPath() {
		WebServerConfigBean configBean = (WebServerConfigBean)super.configBean;
		return configBean != null ? configBean.getContextPath() : "";
	}
	
	@Override
	public void setContextPath(String path) {
		WebServerConfigBean configBean = (WebServerConfigBean)super.configBean;
		if (configBean != null) {
			configBean.setContextPath(path);
		}
	}

}
